package Review;

import java.util.ArrayList;
import java.util.Iterator;

public class Test {
    public static void main(String[] args) {
        ArrayList strs = new ArrayList();

        strs.add("出租车");
        strs.add("汽车");
        strs.add("地铁");
        //使用迭代器方法
        Iterator itor = strs.iterator();
        while(itor.hasNext()){
            System.out.println(itor.next());
        }
    }
    public static void main7(String[] args) {
        String s1 ="Java";
        String s2 ="Java";
        String s3 = new String("Java");
        StringBuffer s4 =new StringBuffer("Java");
        System.out.println(s1==s2);
        System.out.println(s2==s3);

    }
    public static void main6(String[] args) {
        int c=2,b=3;
        int [] a ={22,23,44,33,12};
        System.out.println(a.length);
    }
    public static void main5(String[] args) {
        Student student1 = new Student("张三",19);
        System.out.println("===========================");
        Student student2 = new Student("xiaoming",20);
    }
    public static void main4(String[] args) {
        Person person = new Person("bit",10);
        System.out.println("==============");
        Person person1 =new Person("zhansan",19);

    }
    public static void main3(String[] args) {
        C c = new C();
        c.approach();
    }
    public static void main2(String[] args) {
        C c =new C();

    }
    public static void main1(String[] args) {
        cacao cacao =new cacao();
        cacao.name = "keke";
        cacao.age = 100;
        cacao.height = 100;
        cacao.width =15;
        cacao.Colour();
        cacao.Fruit();
        System.out.println("================");
        AppleTree appleTree =new AppleTree();
        appleTree.name ="xiaoguo";
        appleTree.age =199;
        appleTree.height = 29;
        appleTree.width =10;
        appleTree.Colour();
        appleTree.Fruit();
    }

    public void method(){

    }
}
